package book;
import book.Mybook;

import javax.naming.Name;
import java.awt.print.Book;
import java.io.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
public class test {

    public static void main(String[] args) {

        Map<String, Mybook> map4 = new HashMap<>();
        Mybook mybook = new Mybook();

        while (true) {
            System.out.println("/*      请输入数字        */");
            System.out.println("/*      1.录入图书信息     */");
            System.out.println("/*      2.打印图书信息     */");
            System.out.println("/*      3.查找图书        */");
            System.out.println("/*      4.删除图书        */");
            System.out.println("/*      5.退出           */");
            Scanner scanner = new Scanner(System.in);
            int num = scanner.nextInt();

            switch (num) {

                case 1: mybook.inputData(map4);
                        break;
//                book2:map1.inputData2(book2);break;
                case 2:
                       mybook.print(map4);break;
//                case 3:book1.searchName(map);break;
//                case 4: book1.deleteName();break;
                case 5: return;
                default:
                    break;
            }
        }
    }
}
